<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AUnit: /home/brian/src/AUnit/src/aunit/contrib/gtest.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">AUnit
   &#160;<span id="projectnumber">1.7.1</span>
   </div>
   <div id="projectbrief">Unit testing framework for Arduino platforms inspired by ArduinoUnit and Google Test.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_81cd3825682eb05918933587e078c005.html">aunit</a></li><li class="navelem"><a class="el" href="dir_9268cfe6e304750d3a96b29cda140489.html">contrib</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a>  </div>
  <div class="headertitle">
<div class="title">gtest.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>A simple adapter which allows basic unit tests written using Google Test API (<a href="https://github.com/google/googletest">https://github.com/google/googletest</a>) to run on Arduino platforms using AUnit.  
<a href="#details">More...</a></p>

<p><a href="gtest_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a392bccd552bcb8e04f00e62be33bee03"><td class="memItemLeft" align="right" valign="top"><a id="a392bccd552bcb8e04f00e62be33bee03"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>TEST</b>(category,  name)&#160;&#160;&#160;<a class="el" href="TestMacros_8h.html#a152fb8fe682506b1b08ddda59abce668">test</a>(category##_##name)</td></tr>
<tr class="separator:a392bccd552bcb8e04f00e62be33bee03"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a75294ee88f1038db3b2e69777331f602"><td class="memItemLeft" align="right" valign="top"><a id="a75294ee88f1038db3b2e69777331f602"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>ASSERT_EQ</b>(e,  a)&#160;&#160;&#160;<a class="el" href="AssertVerboseMacros_8h.html#a8ef465d33a5a36963dd24190de055d2d">assertEqual</a>(static_cast&lt;decltype(a)&gt;(e), a)</td></tr>
<tr class="separator:a75294ee88f1038db3b2e69777331f602"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a882e92a343fc8a36e2734a8141a8a3e5"><td class="memItemLeft" align="right" valign="top"><a id="a882e92a343fc8a36e2734a8141a8a3e5"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>ASSERT_NE</b>(e,  a)&#160;&#160;&#160;<a class="el" href="AssertVerboseMacros_8h.html#a8b6e553f85b2a168388016b5afbb0939">assertNotEqual</a>(static_cast&lt;decltype(a)&gt;(e), a)</td></tr>
<tr class="separator:a882e92a343fc8a36e2734a8141a8a3e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abe45b1c8b96a36fa83b19695b9383b00"><td class="memItemLeft" align="right" valign="top"><a id="abe45b1c8b96a36fa83b19695b9383b00"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>ASSERT_LT</b>(e,  a)&#160;&#160;&#160;<a class="el" href="AssertVerboseMacros_8h.html#a2b58bc2c68f19b93996750d5e576b541">assertLess</a>(static_cast&lt;decltype(a)&gt;(e), a)</td></tr>
<tr class="separator:abe45b1c8b96a36fa83b19695b9383b00"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaa848285c5c221ecd4bc12400e6b1e72"><td class="memItemLeft" align="right" valign="top"><a id="aaa848285c5c221ecd4bc12400e6b1e72"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>ASSERT_GT</b>(e,  a)&#160;&#160;&#160;<a class="el" href="AssertVerboseMacros_8h.html#ac883a9a1e4f133b441b11235315f43ab">assertMore</a>(static_cast&lt;decltype(a)&gt;(e), a)</td></tr>
<tr class="separator:aaa848285c5c221ecd4bc12400e6b1e72"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a462ee3dc7e5cfd8fdf0a3ad61fc02dee"><td class="memItemLeft" align="right" valign="top"><a id="a462ee3dc7e5cfd8fdf0a3ad61fc02dee"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>ASSERT_LE</b>(e,  a)&#160;&#160;&#160;<a class="el" href="AssertVerboseMacros_8h.html#a0d297d225f9978905e992fe41975cb5f">assertLessOrEqual</a>(static_cast&lt;decltype(a)&gt;(e), a)</td></tr>
<tr class="separator:a462ee3dc7e5cfd8fdf0a3ad61fc02dee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a713b70a7b87edb0714225f55c0289032"><td class="memItemLeft" align="right" valign="top"><a id="a713b70a7b87edb0714225f55c0289032"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>ASSERT_GE</b>(e,  a)&#160;&#160;&#160;<a class="el" href="AssertVerboseMacros_8h.html#a4e12af47bf69ae0007db97421cf12fdd">assertMoreOrEqual</a>(static_cast&lt;decltype(a)&gt;(e), a)</td></tr>
<tr class="separator:a713b70a7b87edb0714225f55c0289032"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5b84542809bd892618b6c466a7a2a5dc"><td class="memItemLeft" align="right" valign="top"><a id="a5b84542809bd892618b6c466a7a2a5dc"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>ASSERT_STREQ</b>(e,  a)&#160;&#160;&#160;<a class="el" href="AssertVerboseMacros_8h.html#a8ef465d33a5a36963dd24190de055d2d">assertEqual</a>(static_cast&lt;decltype(a)&gt;(e), a)</td></tr>
<tr class="separator:a5b84542809bd892618b6c466a7a2a5dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af618e1f220df40f1507c578b30beb2e3"><td class="memItemLeft" align="right" valign="top"><a id="af618e1f220df40f1507c578b30beb2e3"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>ASSERT_STRNE</b>(e,  a)&#160;&#160;&#160;<a class="el" href="AssertVerboseMacros_8h.html#a8b6e553f85b2a168388016b5afbb0939">assertNotEqual</a>(static_cast&lt;decltype(a)&gt;(e), a)</td></tr>
<tr class="separator:af618e1f220df40f1507c578b30beb2e3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a13400c10333eb73ac1373b4d0813656a"><td class="memItemLeft" align="right" valign="top"><a id="a13400c10333eb73ac1373b4d0813656a"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>ASSERT_STRCASEEQ</b>(e,  a)&#160;&#160;&#160;    <a class="el" href="AssertVerboseMacros_8h.html#a023b4860f97c516ca1a539cc91cbad51">assertStringCaseEqual</a>(static_cast&lt;decltype(a)&gt;(e), a)</td></tr>
<tr class="separator:a13400c10333eb73ac1373b4d0813656a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ade9006f9683e9c9fbec83aba33345032"><td class="memItemLeft" align="right" valign="top"><a id="ade9006f9683e9c9fbec83aba33345032"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>ASSERT_STRCASENE</b>(e,  a)&#160;&#160;&#160;    <a class="el" href="AssertVerboseMacros_8h.html#a8e9e3a7160074ddad9893a4df32929d6">assertStringCaseNotEqual</a>(static_cast&lt;decltype(a)&gt;(e), a)</td></tr>
<tr class="separator:ade9006f9683e9c9fbec83aba33345032"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0b8af275eb03ef66766aa89546edc85d"><td class="memItemLeft" align="right" valign="top"><a id="a0b8af275eb03ef66766aa89546edc85d"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>ASSERT_TRUE</b>(x)&#160;&#160;&#160;<a class="el" href="AssertVerboseMacros_8h.html#abf5260a4376989bd11cbbbb86843e381">assertTrue</a>(x)</td></tr>
<tr class="separator:a0b8af275eb03ef66766aa89546edc85d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a66be21c7c9ac991f2d3b793a207423c3"><td class="memItemLeft" align="right" valign="top"><a id="a66be21c7c9ac991f2d3b793a207423c3"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>ASSERT_FALSE</b>(x)&#160;&#160;&#160;<a class="el" href="AssertVerboseMacros_8h.html#ac2a6771f31162d3ce28d3ce1d3aa8020">assertFalse</a>(x)</td></tr>
<tr class="separator:a66be21c7c9ac991f2d3b793a207423c3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abe4fb330b944dacbec294a9b1e44908d"><td class="memItemLeft" align="right" valign="top"><a id="abe4fb330b944dacbec294a9b1e44908d"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>ASSERT_NEAR</b>(e,  a,  error)&#160;&#160;&#160;<a class="el" href="AssertVerboseMacros_8h.html#ab37dc3ab85b61bad53032bdea0a36b26">assertNear</a>(static_cast&lt;decltype(a)&gt;(e), a, static_cast&lt;decltype(a)&gt;(error))</td></tr>
<tr class="separator:abe4fb330b944dacbec294a9b1e44908d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A simple adapter which allows basic unit tests written using Google Test API (<a href="https://github.com/google/googletest">https://github.com/google/googletest</a>) to run on Arduino platforms using AUnit. </p>
<p>This is not a comprehensive mapping layer. Only the TEST() macro is supported, TEST_F() is not supported. Many of the ASSERT_Xxx() macros are missing. Over time, more mapping macros may be added.</p>
<p>Usage:</p>
<div class="fragment"><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="AUnit_8h.html">AUnit.h</a>&gt;</span></div>
<div class="line"><span class="preprocessor">#include &lt;<a class="code" href="gtest_8h.html">aunit/contrib/gtest.h</a>&gt;</span></div>
<div class="ttc" id="aAUnit_8h_html"><div class="ttname"><a href="AUnit_8h.html">AUnit.h</a></div><div class="ttdoc">Same as AUnitVerbose.h except that the terse versions of the various assertXxx() macros are provided.</div></div>
<div class="ttc" id="agtest_8h_html"><div class="ttname"><a href="gtest_8h.html">gtest.h</a></div><div class="ttdoc">A simple adapter which allows basic unit tests written using Google Test API (https://github....</div></div>
</div><!-- fragment --><p>or</p>
<div class="fragment"><div class="line"><span class="preprocessor">#include &lt;<a class="code" href="AUnitVerbose_8h.html">AUnitVerbose.h</a>&gt;</span></div>
<div class="line"><span class="preprocessor">#include &lt;<a class="code" href="gtest_8h.html">aunit/contrib/gtest.h</a>&gt;</span></div>
<div class="ttc" id="aAUnitVerbose_8h_html"><div class="ttname"><a href="AUnitVerbose_8h.html">AUnitVerbose.h</a></div><div class="ttdoc">Same as AUnit.h except that the verbose versions of the various assertXxx() macros are provided.</div></div>
</div><!-- fragment --> 
<p class="definition">Definition in file <a class="el" href="gtest_8h_source.html">gtest.h</a>.</p>
</div></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>
